package com.loan.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.loan.common.core.mapper.BaseMapperPlus;
import com.loan.system.domain.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author shiguang on 2022/8/29 11:09
 */
public interface UserMapper extends BaseMapperPlus<UserMapper, UserEntity, UserEntity> {

    Page<UserEntity> selectPageUserList(@Param("page") Page<UserEntity> page, @Param(Constants.WRAPPER) Wrapper<UserEntity> buildQueryWrapper);

    void updateUserOpratorStatusByUserId(@Param("userId") Long userId, @Param("operatorName") String operatorName, @Param("status") String status);

    List<Map<String, Object>> selectPageRegisterDataList(@Param("channel") String channel, @Param("beginTime") String beginTime,
                                                         @Param("endTime") String endTime, @Param("pageNum") Integer pageNum,
                                                         @Param("pageSize") Integer pageSize);

    int count(@Param("channel") String channel, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    List<Map<String, Object>> selectTotalList(@Param("channel") String channel, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
}
